package org.jeecg.modules.prizeform.controller;


import io.swagger.annotations.Api;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.prizeform.entity.PrizeForm;
import org.jeecg.modules.prizeform.service.PrizeFormService;
import org.jeecg.modules.professional.service.ProfessionalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.print.PrintService;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liujiamiao
 * @since 2020-11-06
 */
@RestController
@RequestMapping("/prizeform/prize-form")
@Api(tags = "获奖形式")
public class PrizeFormController {

    @Autowired
    private PrizeFormService prizeFormService;

    @GetMapping("/info/{id}")
    public Result info(@PathVariable("id")Integer id){
        PrizeForm prizeForm = prizeFormService.getById(id);
        return Result.ok(prizeForm);
    }

    @GetMapping("/list")
    public Result list(){
        List<PrizeForm> list = prizeFormService.list();
        return Result.ok(list);
    }

}

